<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function foo(num1, num2) {
        console.log(arguments); //这是类数组，没有数组的方法
        // let arr = Array.from(arguments);
        // console.log(arr);
        // arr.forEach((item) => console.log(item));
        for (let i = 0; i < arguments.length; i++) {
          console.log(arguments[i]);
        }
      }
      foo(10, 20, 30, 40);
    </script>
  </body>
</html>
